#! /bin/bash

 
connectionStr=$1

if [[ $connectionStr = "" ]]; then
	echo "connectionStr should not be empty\!"
	exit 1
else
	echo "connection is $connectionStr"
fi

sqlplus ${connectionStr} << end_sql
  set ver off
	 @BuildDB.sql
  exit
end_sql


./ExtractFromWebservice.sh

./StockInfoLoad.sh ${connectionStr} ./tmp/allData.data  
 
 
sqlplus ${connectionStr} << end_sql
  set ver off
	 @CaculateProcess.sql
  exit
end_sql

sqlplus ${connectionStr} << end_sql
  set ver off
	 @ReportKDJ.sql
  exit
end_sql

